﻿@model IEnumerable<Accounting.DataAccess.Bill>
@{
    ViewBag.Title = "Index";
}
<script src="@Url.Content("~/Scripts/jquery-ui.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.ui.datepicker.js")" type="text/javascript"></script>
<link href="@Url.Content("~/Content/jquery-ui-1.8.6.custom.css")" rel="stylesheet" type="text/css" />
<h2>
    Index</h2>
<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            Category
        </th>
        <th>
            SubCategory
        </th>
        <th>
            SpendDate
        </th>
        <th>
            Remark
        </th>
        <th>
        </th>
    </tr>
    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.Category.Name)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.SubCategory.Name)
            </td>
            <td>
                @Html.ActionLink(Html.Encode(String.Format("{0:mm/dd/yyyy}", item.SpendDate.ToShortDateString())), "Edit", new { id = item.Id })
                @*@Html.DisplayFor(modelItem => item.SpendDate, Html.Encode(String.Format("{0:mm/dd/yyyy}", item.SpendDate.ToShortDateString())))*@
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Remark)
            </td>
            <td>
                @Html.ActionLink("Delete", "Delete", new { id = item.Id })
            </td>
        </tr>
    }
</table>
